<template>
    <div>
  <van-nav-bar title="订单详情" left-text="返回" left-arrow @click-left="() => { $router.back() }" fixed/>
<div style="height: 45px;"></div>
<div style="width: 100%;
height: 40px;">
<h2 style="font-size: 25px;font-weight: 700;color: red;margin-left: 28%;">待支付(29分{{time}}秒)</h2>
</div>
<van-cell-group>
  <van-cell title="订单号" value="2024001" />
  <van-cell title="下单时间" value="2024-06-14 12:00:00" />
  <van-cell title="收件人" value="张三" />
  <van-cell title="地址" value="北京市朝阳区" />
  <van-cell title="总金额" value="200:00" />
</van-cell-group>
  <div >
    <van-button  block type="primary" native-type="submit" @click="zf">
    立即支付
    </van-button>
  </div>
    </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
const router=useRouter()
const zf=()=>{
  router.push('/dd')
}
import { ref } from 'vue';
const time=ref('')
let timer;
const ds=()=>{
time.value=10
timer=setInterval(() => {
  time.value--
  if( time.value==0){
    clearTimeout(timer)
     router.push('/dd')
  }
}, 1000);
}
ds()
  </script>

<style lang="scss" scoped>

</style>